
<template>
<div class="buylist">
    <div class="bg"></div>
    <van-nav-bar id="van-bar" :title="title" fixed :border="border" left-arrow @click-left="onClickLeft">
            <template #left>
                <img :style="{width:widthPx,height:heightPx}" src="@/assets/iconPerfectInformation/nav_back@2x.png" />
            </template>
        </van-nav-bar>
        <div  :style="'margin-top:'+topheight+'px;height:calc(100vh - '+topheight+'px);width:100%;overflow:auto;'">
        <van-cell-group>
  <van-cell title="账号管理" is-link url="/setting/user" />
  <van-cell title="通知设置" is-link url="/setting/notice" />
  <van-cell title="隐私设置" is-link url="/setting/privacy" />
  <van-cell title="黑名单列表" is-link url="/setting/blacklist" />
  <van-cell title="反馈建议" is-link url="/setting/feedback" />
  <van-cell title="平台协议" is-link url="/xieyi" />
  <!-- <van-cell title="清除缓存" value="89KB" is-link to="#" /> -->
  <van-cell title="当前版本" value="1.0" is-link to="#" />
    </van-cell-group>
    <van-button round plain style="margin: 20px auto;width: 120px; border-color: #ccc;" size="small" block @click="out"  >退出登录</van-button>
        </div>
   
  </div>
 
</template>

<script>
export default {
  data(){
      return{
        border:'',
        widthPx:'28px',
        heightPx:'28px',
        topheight:0,
        title:'设置',
      
      }
    },
    mounted(){
      this.topheight=document.getElementById("van-bar").offsetHeight
       
    },
   
    methods:{
      out(){
       var keys = document.cookie.match(/[^ =;]+(?=\=)/g);
        window.localStorage.clear();
        window.sessionStorage.clear();
      if (keys) {
        for (var i = keys.length; i--; ) {
          document.cookie =
            keys[i] + "=0;path=/;expires=" + new Date(0).toUTCString(); //清除当前域名下
          document.cookie =
            keys[i] +
            "=0;path=/;domain=" +
            document.domain +
            ";expires=" +
            new Date(0).toUTCString();
          document.cookie =
            keys[i] +
            "=0;path=示例：/index.vue（不同域的path,也就是你清除不了的cookie）;domain=示例：10.10.10.208（不同域的domain,也就是你清除不了的cookie）;expires=" +
            new Date(0).toUTCString();
        }
      }
        location.reload()
        //  this.$router.push({ path: '/Login', replace: true });
      },
      onClickLeft(){
        this.$router.back()
      }
    }
}
</script>

<style  scoped>


 .van-cell::after{
    border-color: #D8D8D8;
}
.van-cell__value{
    color: #1A1A1A;
    font-weight: 500;
}
</style>